<!DOCTYPE HTML>
<html lang="en" >
    <!-- Start book 美多商城 -->
    <head>
        <!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>配置 | 美多商城</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../C02-Users/index.html" />
    
    
    <link rel="prev" href="../C01-Prepare/StartProject.html" />
    

        <!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
        
    <div class="book"
        data-level="1.6"
        data-chapter-title="配置"
        data-filepath="C01-Prepare/Config.md"
        data-basepath=".."
        data-revision="Sat Sep 01 2018 17:18:16 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        美多商城
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="C01-Prepare/index.html">
            
                
                    <a href="../C01-Prepare/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        项目准备
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="C01-Prepare/BusinessModel.html">
            
                
                    <a href="../C01-Prepare/BusinessModel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        商业模式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="C01-Prepare/DevelopmentProcess.html">
            
                
                    <a href="../C01-Prepare/DevelopmentProcess.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        开发流程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="C01-Prepare/ProductAnalysis.html">
            
                
                    <a href="../C01-Prepare/ProductAnalysis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        需求分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="C01-Prepare/ProjectStructure.html">
            
                
                    <a href="../C01-Prepare/ProjectStructure.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        项目架构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="C01-Prepare/StartProject.html">
            
                
                    <a href="../C01-Prepare/StartProject.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        创建工程
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1.6" data-path="C01-Prepare/Config.html">
            
                
                    <a href="../C01-Prepare/Config.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        配置
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="C02-Users/index.html">
            
                
                    <a href="../C02-Users/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        用户部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="C02-Users/UserModel.html">
            
                
                    <a href="../C02-Users/UserModel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        用户模型类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="C02-Users/Domain.html">
            
                
                    <a href="../C02-Users/Domain.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        设置域名
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="C02-Users/CORS.html">
            
                
                    <a href="../C02-Users/CORS.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        跨域CORS
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="C02-Users/RegisterAnalysis.html">
            
                
                    <a href="../C02-Users/RegisterAnalysis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        注册
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="C02-Users/SMSCode.html">
            
                
                    <a href="../C02-Users/SMSCode.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.1.</b>
                        
                        短信验证码
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.2" data-path="C02-Users/CelerySendSMSCode.html">
            
                
                    <a href="../C02-Users/CelerySendSMSCode.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.2.</b>
                        
                        使用Celery发送短信
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.3" data-path="C02-Users/AccountExistingCheck.html">
            
                
                    <a href="../C02-Users/AccountExistingCheck.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.3.</b>
                        
                        判断帐号是否存在
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.4" data-path="C02-Users/Register.html">
            
                
                    <a href="../C02-Users/Register.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.4.</b>
                        
                        注册
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="C02-Users/JWT.html">
            
                
                    <a href="../C02-Users/JWT.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        JWT
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.1" data-path="C02-Users/DRF-JWT.html">
            
                
                    <a href="../C02-Users/DRF-JWT.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.1.</b>
                        
                        drf JWT
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="C02-Users/Login.html">
            
                
                    <a href="../C02-Users/Login.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        登录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="C02-Users/QQLogin/index.html">
            
                
                    <a href="../C02-Users/QQLogin/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        QQ登录
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.7.1" data-path="C02-Users/QQLogin/Step1.html">
            
                
                    <a href="../C02-Users/QQLogin/Step1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.1.</b>
                        
                        第一步:获取url
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7.2" data-path="C02-Users/QQLogin/Step2.html">
            
                
                    <a href="../C02-Users/QQLogin/Step2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.2.</b>
                        
                        第二步:获取openID
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7.3" data-path="C02-Users/QQLogin/Step3.html">
            
                
                    <a href="../C02-Users/QQLogin/Step3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.3.</b>
                        
                        第三步:绑定账户
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7.4" data-path="C02-Users/QQLogin/Step4.html">
            
                
                    <a href="../C02-Users/QQLogin/Step4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.4.</b>
                        
                        itsdangerous
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="C02-Users/UserInfo.html">
            
                
                    <a href="../C02-Users/UserInfo.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        用户中心个人信息
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="C02-Users/Email/index.html">
            
                
                    <a href="../C02-Users/Email/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.</b>
                        
                        邮件与验证
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.9.1" data-path="C02-Users/Email/DjangoEmail.html">
            
                
                    <a href="../C02-Users/Email/DjangoEmail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.1.</b>
                        
                        Django发送邮件的方法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.9.2" data-path="C02-Users/Email/SendEmail.html">
            
                
                    <a href="../C02-Users/Email/SendEmail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.2.</b>
                        
                        保存邮箱并发送验证邮件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.9.3" data-path="C02-Users/Email/VerifyEmail.html">
            
                
                    <a href="../C02-Users/Email/VerifyEmail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.3.</b>
                        
                        验证邮箱链接
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="C02-Users/Address/index.html">
            
                
                    <a href="../C02-Users/Address/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.</b>
                        
                        收货地址
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.10.1" data-path="C02-Users/Address/AreaSelect.html">
            
                
                    <a href="../C02-Users/Address/AreaSelect.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.1.</b>
                        
                        省市区地址查询
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10.2" data-path="C02-Users/Address/Cache.html">
            
                
                    <a href="../C02-Users/Address/Cache.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.2.</b>
                        
                        使用缓存
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10.3" data-path="C02-Users/Address/UserAddressManagement.html">
            
                
                    <a href="../C02-Users/Address/UserAddressManagement.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.3.</b>
                        
                        用户地址管理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10.4" data-path="C02-Users/Address/UserAddressCode.html">
            
                
                    <a href="../C02-Users/Address/UserAddressCode.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.4.</b>
                        
                        用户地址代码
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="C03-Goods/index.html">
            
                
                    <a href="../C03-Goods/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        商品部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="C03-Goods/DatabaseDesign.html">
            
                
                    <a href="../C03-Goods/DatabaseDesign.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        数据表设计
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="C03-Goods/DatabaseGoods.html">
            
                
                    <a href="../C03-Goods/DatabaseGoods.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.1.</b>
                        
                        商品模型类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="C03-Goods/DatabaseContents.html">
            
                
                    <a href="../C03-Goods/DatabaseContents.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.2.</b>
                        
                        广告模型类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="C03-Goods/DatabaseMigrate.html">
            
                
                    <a href="../C03-Goods/DatabaseMigrate.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.3.</b>
                        
                        迁移
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="C03-Goods/FastDFS.html">
            
                
                    <a href="../C03-Goods/FastDFS.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        FastDFS分布式文件系统
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="C03-Goods/Docker/index.html">
            
                
                    <a href="../C03-Goods/Docker/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        Docker使用
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1" data-path="C03-Goods/Docker/Introduce.html">
            
                
                    <a href="../C03-Goods/Docker/Introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.1.</b>
                        
                        Docker简介
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.2" data-path="C03-Goods/Docker/InstallAndOperations.html">
            
                
                    <a href="../C03-Goods/Docker/InstallAndOperations.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.2.</b>
                        
                        安装与操作
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="C03-Goods/FastDFSDocker.html">
            
                
                    <a href="../C03-Goods/FastDFSDocker.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        使用Docker安装FastDFS
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="C03-Goods/FastDFSClientAndDjangoFileSystem.html">
            
                
                    <a href="../C03-Goods/FastDFSClientAndDjangoFileSystem.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        FastDFS客户端与自定义文件存储系统
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="C03-Goods/CKEditor.html">
            
                
                    <a href="../C03-Goods/CKEditor.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        CKEditor富文本编辑器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="C03-Goods/ImportGoodsData.html">
            
                
                    <a href="../C03-Goods/ImportGoodsData.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        添加测试数据
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="C03-Goods/FreezeHTML.html">
            
                
                    <a href="../C03-Goods/FreezeHTML.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        页面静态化
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="C03-Goods/DjangoCrontab.html">
            
                
                    <a href="../C03-Goods/DjangoCrontab.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        定时任务
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="C03-Goods/CategoryQuery.html">
            
                
                    <a href="../C03-Goods/CategoryQuery.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.</b>
                        
                        查询分类的封装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.11" data-path="C03-Goods/GoodsList.html">
            
                
                    <a href="../C03-Goods/GoodsList.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.11.</b>
                        
                        商品列表页
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.12" data-path="C03-Goods/GoodsSearch.html">
            
                
                    <a href="../C03-Goods/GoodsSearch.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.12.</b>
                        
                        商品搜索
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.13" data-path="C03-Goods/GoodsDetail.html">
            
                
                    <a href="../C03-Goods/GoodsDetail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.13.</b>
                        
                        商品详情页面
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.14" data-path="C03-Goods/UserBrowseHistory.html">
            
                
                    <a href="../C03-Goods/UserBrowseHistory.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.14.</b>
                        
                        用户浏览历史记录
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="C04-Cart/index.html">
            
                
                    <a href="../C04-Cart/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        购物车部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="C04-Cart/DataStructureDesign.html">
            
                
                    <a href="../C04-Cart/DataStructureDesign.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        购物车数据存储设计
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="C04-Cart/Add.html">
            
                
                    <a href="../C04-Cart/Add.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        购物车增加
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="C04-Cart/Query.html">
            
                
                    <a href="../C04-Cart/Query.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        购物车查询
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="C04-Cart/Modify.html">
            
                
                    <a href="../C04-Cart/Modify.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        购物车修改
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="C04-Cart/Delete.html">
            
                
                    <a href="../C04-Cart/Delete.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        购物车删除
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="C04-Cart/SelectAll.html">
            
                
                    <a href="../C04-Cart/SelectAll.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.6.</b>
                        
                        购物车全选
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="C04-Cart/MergeCart.html">
            
                
                    <a href="../C04-Cart/MergeCart.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.7.</b>
                        
                        登录合并购物车
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="C05-Order/index.html">
            
                
                    <a href="../C05-Order/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        订单部分
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="C05-Order/OrderDBModel.html">
            
                
                    <a href="../C05-Order/OrderDBModel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        订单数据库设计
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="C05-Order/PlaceOrder.html">
            
                
                    <a href="../C05-Order/PlaceOrder.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        订单结算
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="C05-Order/SaveOrder.html">
            
                
                    <a href="../C05-Order/SaveOrder.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        保存订单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="C05-Order/OrderSuccess.html">
            
                
                    <a href="../C05-Order/OrderSuccess.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        下单成功
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="C06-Pay/index.html">
            
                
                    <a href="../C06-Pay/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        支付宝支付
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="C06-Pay/Alipay.html">
            
                
                    <a href="../C06-Pay/Alipay.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        接入支付宝
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="C06-Pay/Paying.html">
            
                
                    <a href="../C06-Pay/Paying.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        发起支付
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="C06-Pay/PaymentResult.html">
            
                
                    <a href="../C06-Pay/PaymentResult.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        保存支付结果
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" data-path="C07-Xadmin.html">
            
                
                    <a href="../C07-Xadmin.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        Xadmin
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8" data-path="C08-Permission.html">
            
                
                    <a href="../C08-Permission.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        用户权限控制
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9" data-path="C09-Database/index.html">
            
                
                    <a href="../C09-Database/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.</b>
                        
                        数据库读写分离
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.1" data-path="C09-Database/MasterSlave.html">
            
                
                    <a href="../C09-Database/MasterSlave.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.1.</b>
                        
                        主从同步配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9.2" data-path="C09-Database/ReadWriteSeparate.html">
            
                
                    <a href="../C09-Database/ReadWriteSeparate.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.2.</b>
                        
                        Django数据库读写分离
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10" data-path="C10-Deploy.html">
            
                
                    <a href="../C10-Deploy.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.</b>
                        
                        Django部署
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >美多商城</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x914D;&#x7F6E;">&#x914D;&#x7F6E;</h1>
<h2 id="1---&#x4FEE;&#x6539;settingsdevpy-&#x6587;&#x4EF6;&#x4E2D;&#x7684;&#x8DEF;&#x5F84;&#x4FE1;&#x606F;">1.   &#x4FEE;&#x6539;settings/dev.py &#x6587;&#x4EF6;&#x4E2D;&#x7684;&#x8DEF;&#x5F84;&#x4FE1;&#x606F;</h2>
<p>&#x6211;&#x4EEC;&#x5C06;Django&#x7684;&#x5E94;&#x7528;&#x653E;&#x5230;&#x4E86; <code>&#x5DE5;&#x7A0B;&#x76EE;&#x5F55;/meiduo_mall/apps</code>&#x76EE;&#x5F55;&#x4E0B;&#xFF0C;&#x5982;&#x679C;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x5E94;&#x7528;&#xFF0C;&#x6BD4;&#x5982;users&#xFF0C;&#x90A3;&#x4E48;&#x5728;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x7684;INSTALLED_APPS&#x4E2D;&#x6CE8;&#x518C;&#x5E94;&#x7528;&#x5E94;&#x8BE5;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code class="lang-python">INSTALLED_APPS = [
    ...
    <span class="hljs-string">&apos;meiduo_mall.apps.users.apps.UsersConfig&apos;</span>,
]
</code></pre>
<p>&#x4E3A;&#x4E86;&#x8FD8;&#x80FD;&#x50CF;&#x5982;&#x4E0B;&#x65B9;&#x5F0F;&#x7B80;&#x4FBF;&#x7684;&#x6CE8;&#x518C;&#x5F15;&#x7528;&#xFF0C;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x5411;Python&#x89E3;&#x91CA;&#x5668;&#x7684;&#x5BFC;&#x5305;&#x8DEF;&#x5F84;&#x4E2D;&#x6DFB;&#x52A0;apps&#x5E94;&#x7528;&#x76EE;&#x5F55;&#x7684;&#x8DEF;&#x5F84;&#x3002;</p>
<pre><code class="lang-python">INSTALLED_APPS = [
    ...
    <span class="hljs-string">&apos;users.apps.UsersConfig&apos;</span>,
]
</code></pre>
<p>&#x6211;&#x4EEC;&#x5C06;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x6539;&#x4E3A;&#x653E;&#x5728;settings&#x5B50;&#x76EE;&#x5F55;&#x4E0B;&#xFF0C;&#x6240;&#x4EE5; &#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E2D;&#x7684;<code>BASE_DIR</code>&#x6307;&#x5411;&#x7684;&#x53D8;&#x4E3A;&#x4E86;<code>meiduo/meiduo_mall/meiduo_mall</code>&#x3002;</p>
<p>&#x4F7F;&#x7528;<code>sys.path</code>&#x6DFB;&#x52A0;<code>&lt;BASE_DIR&gt;/apps</code>&#x76EE;&#x5F55;&#xFF0C;&#x5373;&#x53EF;&#x6DFB;&#x52A0;apps&#x5E94;&#x7528;&#x7684;&#x5BFC;&#x5305;&#x8DEF;&#x5F84;&#x3002;</p>
<pre><code class="lang-python"><span class="hljs-comment"># Build paths inside the project like this: os.path.join(BASE_DIR, ...)</span>
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

<span class="hljs-comment"># &#x6DFB;&#x52A0;&#x5BFC;&#x5305;&#x8DEF;&#x5F84;</span>
<span class="hljs-keyword">import</span> sys
sys.path.insert(<span class="hljs-number">0</span>, os.path.join(BASE_DIR, <span class="hljs-string">&apos;apps&apos;</span>))
</code></pre>
<h2 id="2--installedapps">2.  INSTALLED_APPS</h2>
<p>&#x5728;INSTALLED_APPS&#x4E2D;&#x6DFB;&#x52A0;rest_framework</p>
<pre><code class="lang-python">INSTALLED_APPS = [
    ...
    <span class="hljs-string">&apos;rest_framework&apos;</span>,
]
</code></pre>
<h2 id="3--&#x6570;&#x636E;&#x5E93;">3.  &#x6570;&#x636E;&#x5E93;</h2>
<pre><code class="lang-python">DATABASES = {
    <span class="hljs-string">&apos;default&apos;</span>: {
        <span class="hljs-string">&apos;ENGINE&apos;</span>: <span class="hljs-string">&apos;django.db.backends.mysql&apos;</span>,
        <span class="hljs-string">&apos;HOST&apos;</span>: <span class="hljs-string">&apos;127.0.0.1&apos;</span>,  <span class="hljs-comment"># &#x6570;&#x636E;&#x5E93;&#x4E3B;&#x673A;</span>
        <span class="hljs-string">&apos;PORT&apos;</span>: <span class="hljs-number">3306</span>,  <span class="hljs-comment"># &#x6570;&#x636E;&#x5E93;&#x7AEF;&#x53E3;</span>
        <span class="hljs-string">&apos;USER&apos;</span>: <span class="hljs-string">&apos;meiduo&apos;</span>,  <span class="hljs-comment"># &#x6570;&#x636E;&#x5E93;&#x7528;&#x6237;&#x540D;</span>
        <span class="hljs-string">&apos;PASSWORD&apos;</span>: <span class="hljs-string">&apos;meiduo&apos;</span>,  <span class="hljs-comment"># &#x6570;&#x636E;&#x5E93;&#x7528;&#x6237;&#x5BC6;&#x7801;</span>
        <span class="hljs-string">&apos;NAME&apos;</span>: <span class="hljs-string">&apos;meiduo_mall&apos;</span>  <span class="hljs-comment"># &#x6570;&#x636E;&#x5E93;&#x540D;&#x5B57;</span>
    }
}
</code></pre>
<p>&#x6CE8;&#x610F;&#xFF1A;</p>
<p>&#x8BB0;&#x5F97;&#x5728;<code>meiduo/meiduo_mall/__init__.py</code>&#x6587;&#x4EF6;&#x4E2D;&#x6DFB;&#x52A0;</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> pymysql

pymysql.install_as_MySQLdb()
</code></pre>
<h2 id="4--redis">4.  Redis</h2>
<p>&#x5B89;&#x88C5;django-redis&#xFF0C;&#x5E76;&#x914D;&#x7F6E;</p>
<pre><code class="lang-python">CACHES = {
    <span class="hljs-string">&quot;default&quot;</span>: {
        <span class="hljs-string">&quot;BACKEND&quot;</span>: <span class="hljs-string">&quot;django_redis.cache.RedisCache&quot;</span>,
        <span class="hljs-string">&quot;LOCATION&quot;</span>: <span class="hljs-string">&quot;redis://127.0.0.1:6379/0&quot;</span>,
        <span class="hljs-string">&quot;OPTIONS&quot;</span>: {
            <span class="hljs-string">&quot;CLIENT_CLASS&quot;</span>: <span class="hljs-string">&quot;django_redis.client.DefaultClient&quot;</span>,
        }
    },
    <span class="hljs-string">&quot;session&quot;</span>: {
        <span class="hljs-string">&quot;BACKEND&quot;</span>: <span class="hljs-string">&quot;django_redis.cache.RedisCache&quot;</span>,
        <span class="hljs-string">&quot;LOCATION&quot;</span>: <span class="hljs-string">&quot;redis://127.0.0.1:6379/1&quot;</span>,
        <span class="hljs-string">&quot;OPTIONS&quot;</span>: {
            <span class="hljs-string">&quot;CLIENT_CLASS&quot;</span>: <span class="hljs-string">&quot;django_redis.client.DefaultClient&quot;</span>,
        }
    }
}
SESSION_ENGINE = <span class="hljs-string">&quot;django.contrib.sessions.backends.cache&quot;</span>
SESSION_CACHE_ALIAS = <span class="hljs-string">&quot;session&quot;</span>
</code></pre>
<p>&#x9664;&#x4E86;&#x540D;&#x4E3A;default&#x7684;redis&#x914D;&#x7F6E;&#x5916;&#xFF0C;&#x8FD8;&#x8865;&#x5145;&#x4E86;&#x540D;&#x4E3A;session&#x7684;redis&#x914D;&#x7F6E;&#xFF0C;&#x5206;&#x522B;&#x4F7F;&#x7528;&#x4E24;&#x4E2A;&#x4E0D;&#x540C;&#x7684;redis&#x5E93;&#x3002;</p>
<p>&#x540C;&#x65F6;&#x4FEE;&#x6539;&#x4E86;Django&#x7684;Session&#x673A;&#x5236;&#x4F7F;&#x7528;redis&#x4FDD;&#x5B58;&#xFF0C;&#x4E14;&#x4F7F;&#x7528;&#x540D;&#x4E3A;&apos;session&apos;&#x7684;redis&#x914D;&#x7F6E;&#x3002;</p>
<p>&#x6B64;&#x5904;&#x4FEE;&#x6539;Django&#x7684;Session&#x673A;&#x5236;&#x5B58;&#x50A8;&#x4E3B;&#x8981;&#x662F;&#x4E3A;&#x4E86;&#x7ED9;Admin&#x7AD9;&#x70B9;&#x4F7F;&#x7528;&#x3002;</p>
<p><strong>&#x5173;&#x4E8E;django-redis &#x7684;&#x4F7F;&#x7528;&#xFF0C;&#x8BF4;&#x660E;&#x6587;&#x6863;&#x53EF;&#x89C1;<a href="http://django-redis-chs.readthedocs.io/zh_CN/latest/" target="_blank">http://django-redis-chs.readthedocs.io/zh_CN/latest/</a></strong></p>
<h2 id="5-&#x672C;&#x5730;&#x5316;&#x8BED;&#x8A00;&#x4E0E;&#x65F6;&#x533A;">5. &#x672C;&#x5730;&#x5316;&#x8BED;&#x8A00;&#x4E0E;&#x65F6;&#x533A;</h2>
<pre><code class="lang-python">LANGUAGE_CODE = <span class="hljs-string">&apos;zh-hans&apos;</span>

TIME_ZONE = <span class="hljs-string">&apos;Asia/Shanghai&apos;</span>
</code></pre>
<h2 id="6--&#x65E5;&#x5FD7;">6.  &#x65E5;&#x5FD7;</h2>
<pre><code class="lang-python">LOGGING = {
    <span class="hljs-string">&apos;version&apos;</span>: <span class="hljs-number">1</span>,
    <span class="hljs-string">&apos;disable_existing_loggers&apos;</span>: <span class="hljs-keyword">False</span>,  <span class="hljs-comment"># &#x662F;&#x5426;&#x7981;&#x7528;&#x5DF2;&#x7ECF;&#x5B58;&#x5728;&#x7684;&#x65E5;&#x5FD7;&#x5668;</span>
    <span class="hljs-string">&apos;formatters&apos;</span>: {  <span class="hljs-comment"># &#x65E5;&#x5FD7;&#x4FE1;&#x606F;&#x663E;&#x793A;&#x7684;&#x683C;&#x5F0F;</span>
        <span class="hljs-string">&apos;verbose&apos;</span>: {
            <span class="hljs-string">&apos;format&apos;</span>: <span class="hljs-string">&apos;%(levelname)s %(asctime)s %(module)s %(lineno)d %(message)s&apos;</span>
        },
        <span class="hljs-string">&apos;simple&apos;</span>: {
            <span class="hljs-string">&apos;format&apos;</span>: <span class="hljs-string">&apos;%(levelname)s %(module)s %(lineno)d %(message)s&apos;</span>
        },
    },
    <span class="hljs-string">&apos;filters&apos;</span>: {  <span class="hljs-comment"># &#x5BF9;&#x65E5;&#x5FD7;&#x8FDB;&#x884C;&#x8FC7;&#x6EE4;</span>
        <span class="hljs-string">&apos;require_debug_true&apos;</span>: {  <span class="hljs-comment"># django&#x5728;debug&#x6A21;&#x5F0F;&#x4E0B;&#x624D;&#x8F93;&#x51FA;&#x65E5;&#x5FD7;</span>
            <span class="hljs-string">&apos;()&apos;</span>: <span class="hljs-string">&apos;django.utils.log.RequireDebugTrue&apos;</span>,
        },
    },
    <span class="hljs-string">&apos;handlers&apos;</span>: {  <span class="hljs-comment"># &#x65E5;&#x5FD7;&#x5904;&#x7406;&#x65B9;&#x6CD5;</span>
        <span class="hljs-string">&apos;console&apos;</span>: {  <span class="hljs-comment"># &#x5411;&#x7EC8;&#x7AEF;&#x4E2D;&#x8F93;&#x51FA;&#x65E5;&#x5FD7;</span>
            <span class="hljs-string">&apos;level&apos;</span>: <span class="hljs-string">&apos;INFO&apos;</span>,
            <span class="hljs-string">&apos;filters&apos;</span>: [<span class="hljs-string">&apos;require_debug_true&apos;</span>],
            <span class="hljs-string">&apos;class&apos;</span>: <span class="hljs-string">&apos;logging.StreamHandler&apos;</span>,
            <span class="hljs-string">&apos;formatter&apos;</span>: <span class="hljs-string">&apos;simple&apos;</span>
        },
        <span class="hljs-string">&apos;file&apos;</span>: {  <span class="hljs-comment"># &#x5411;&#x6587;&#x4EF6;&#x4E2D;&#x8F93;&#x51FA;&#x65E5;&#x5FD7;</span>
            <span class="hljs-string">&apos;level&apos;</span>: <span class="hljs-string">&apos;INFO&apos;</span>,
            <span class="hljs-string">&apos;class&apos;</span>: <span class="hljs-string">&apos;logging.handlers.RotatingFileHandler&apos;</span>,
            <span class="hljs-string">&apos;filename&apos;</span>: os.path.join(BASE_DIR, <span class="hljs-string">&quot;logs/meiduo.log&quot;</span>),  <span class="hljs-comment"># &#x65E5;&#x5FD7;&#x6587;&#x4EF6;&#x7684;&#x4F4D;&#x7F6E;</span>
            <span class="hljs-string">&apos;maxBytes&apos;</span>: <span class="hljs-number">300</span> * <span class="hljs-number">1024</span> * <span class="hljs-number">1024</span>,
            <span class="hljs-string">&apos;backupCount&apos;</span>: <span class="hljs-number">10</span>,
            <span class="hljs-string">&apos;formatter&apos;</span>: <span class="hljs-string">&apos;verbose&apos;</span>
        },
    },
    <span class="hljs-string">&apos;loggers&apos;</span>: {  <span class="hljs-comment"># &#x65E5;&#x5FD7;&#x5668;</span>
        <span class="hljs-string">&apos;django&apos;</span>: {  <span class="hljs-comment"># &#x5B9A;&#x4E49;&#x4E86;&#x4E00;&#x4E2A;&#x540D;&#x4E3A;django&#x7684;&#x65E5;&#x5FD7;&#x5668;</span>
            <span class="hljs-string">&apos;handlers&apos;</span>: [<span class="hljs-string">&apos;console&apos;</span>, <span class="hljs-string">&apos;file&apos;</span>],  <span class="hljs-comment"># &#x53EF;&#x4EE5;&#x540C;&#x65F6;&#x5411;&#x7EC8;&#x7AEF;&#x4E0E;&#x6587;&#x4EF6;&#x4E2D;&#x8F93;&#x51FA;&#x65E5;&#x5FD7;</span>
            <span class="hljs-string">&apos;propagate&apos;</span>: <span class="hljs-keyword">True</span>,  <span class="hljs-comment"># &#x662F;&#x5426;&#x7EE7;&#x7EED;&#x4F20;&#x9012;&#x65E5;&#x5FD7;&#x4FE1;&#x606F;</span>
            <span class="hljs-string">&apos;level&apos;</span>: <span class="hljs-string">&apos;INFO&apos;</span>,  <span class="hljs-comment"># &#x65E5;&#x5FD7;&#x5668;&#x63A5;&#x6536;&#x7684;&#x6700;&#x4F4E;&#x65E5;&#x5FD7;&#x7EA7;&#x522B;</span>
        },
    }
}
</code></pre>
<h2 id="7--&#x5F02;&#x5E38;&#x5904;&#x7406;">7.  &#x5F02;&#x5E38;&#x5904;&#x7406;</h2>
<p>&#x4FEE;&#x6539;Django REST framework&#x7684;&#x9ED8;&#x8BA4;&#x5F02;&#x5E38;&#x5904;&#x7406;&#x65B9;&#x6CD5;&#xFF0C;&#x8865;&#x5145;&#x5904;&#x7406;&#x6570;&#x636E;&#x5E93;&#x5F02;&#x5E38;&#x548C;Redis&#x5F02;&#x5E38;&#x3002;</p>
<p>&#x65B0;&#x5EFA;utils/exceptions.py</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> rest_framework.views <span class="hljs-keyword">import</span> exception_handler <span class="hljs-keyword">as</span> drf_exception_handler
<span class="hljs-keyword">import</span> logging
<span class="hljs-keyword">from</span> django.db <span class="hljs-keyword">import</span> DatabaseError
<span class="hljs-keyword">from</span> redis.exceptions <span class="hljs-keyword">import</span> RedisError
<span class="hljs-keyword">from</span> rest_framework.response <span class="hljs-keyword">import</span> Response
<span class="hljs-keyword">from</span> rest_framework <span class="hljs-keyword">import</span> status

<span class="hljs-comment"># &#x83B7;&#x53D6;&#x5728;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E2D;&#x5B9A;&#x4E49;&#x7684;logger&#xFF0C;&#x7528;&#x6765;&#x8BB0;&#x5F55;&#x65E5;&#x5FD7;</span>
logger = logging.getLogger(<span class="hljs-string">&apos;django&apos;</span>)

<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">exception_handler</span><span class="hljs-params">(exc, context)</span>:</span>
    <span class="hljs-string">&quot;&quot;&quot;
    &#x81EA;&#x5B9A;&#x4E49;&#x5F02;&#x5E38;&#x5904;&#x7406;
    :param exc: &#x5F02;&#x5E38;
    :param context: &#x629B;&#x51FA;&#x5F02;&#x5E38;&#x7684;&#x4E0A;&#x4E0B;&#x6587;
    :return: Response&#x54CD;&#x5E94;&#x5BF9;&#x8C61;
    &quot;&quot;&quot;</span>
    <span class="hljs-comment"># &#x8C03;&#x7528;drf&#x6846;&#x67B6;&#x539F;&#x751F;&#x7684;&#x5F02;&#x5E38;&#x5904;&#x7406;&#x65B9;&#x6CD5;</span>
    response = drf_exception_handler(exc, context)

    <span class="hljs-keyword">if</span> response <span class="hljs-keyword">is</span> <span class="hljs-keyword">None</span>:
        view = context[<span class="hljs-string">&apos;view&apos;</span>]
        <span class="hljs-keyword">if</span> isinstance(exc, DatabaseError) <span class="hljs-keyword">or</span> isinstance(exc, RedisError):
            <span class="hljs-comment"># &#x6570;&#x636E;&#x5E93;&#x5F02;&#x5E38;</span>
            logger.error(<span class="hljs-string">&apos;[%s] %s&apos;</span> % (view, exc))
            response = Response({<span class="hljs-string">&apos;message&apos;</span>: <span class="hljs-string">&apos;&#x670D;&#x52A1;&#x5668;&#x5185;&#x90E8;&#x9519;&#x8BEF;&apos;</span>}, status=status.HTTP_507_INSUFFICIENT_STORAGE)

    <span class="hljs-keyword">return</span> response
</code></pre>
<p>&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E2D;&#x6DFB;&#x52A0;</p>
<pre><code class="lang-python">REST_FRAMEWORK = {
    <span class="hljs-comment"># &#x5F02;&#x5E38;&#x5904;&#x7406;</span>
    <span class="hljs-string">&apos;EXCEPTION_HANDLER&apos;</span>: <span class="hljs-string">&apos;utils.exceptions.exception_handler&apos;</span>,
}
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../C01-Prepare/StartProject.html" class="navigation navigation-prev " aria-label="Previous page: 创建工程"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../C02-Users/index.html" class="navigation navigation-next " aria-label="Next page: 用户部分"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"toggle-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
    </body>
    <!-- End of book 美多商城 -->
</html>
